﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ClownStopper
{

    public interface IMessageClientDetails
    {
        String ClientName { get; set; }

        String ClientIPAddress { get; set; }

        int ClientListenPort { get; set; }
    }

    public class MessageClientDetails : IMessageClientDetails
    {
        #region IMessageClientDetails Members

        public String ClientName { get; set; }

        public String ClientIPAddress { get; set; }

        public int ClientListenPort { get; set; }

        #endregion

        public override bool Equals(object obj)
        {
            if (obj == null)
                return false;

            if (GetType() != obj.GetType())
                return false;

            return (ClientListenPort == ((MessageClientDetails)obj).ClientListenPort && ClientIPAddress == ((MessageClientDetails)obj).ClientIPAddress && ClientName == ((MessageClientDetails)obj).ClientName); //base.Equals(obj);
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}
